<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		window.onload= function () {
			btn = document.getElementById('btn');

			btn.onclick = function () {
				btn.style.background="blue";
			}

			btn.ondblclick = function () {
				btn.style.background="blue";
			}

			btn.onmouseover = function () {
				btn.style.background="blue";
			}

			btn.onmouseout = function () {
				btn.style.background="red";
			}

			input = document.getElementById('input')

			input.onchange=function () {
				// btn.style.display = "none";
			}

			input.onfocus=function () {
				btn.style.display = "none";
			}
		}
	</script>

</head>
<body>
	<input type="button" id="btn" value="我是按钮" name="">

	<input type="text" id="input"  name="">
</body>
</html>